package main

import "fmt"

type Person struct {
	Name string
	Sex  byte
	Age  int
}

func (person Person) printInfo() {
	p := &person
	fmt.Println("printInfo:", p)
}
func (person *Person) printPointer() {
	fmt.Printf("p2name=%s\n", person.Name)
}

func main() {

	// 需要显示的引用调用者  目的: 调用多个对象
	f := (*Person).printPointer

	person := &Person{
		Name: "xdc",
		Sex:  1,
		Age:  1,
	}

	f(person)
}
